<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button id="btn">单击</button>
</body>
</html>
<script>
    var btn1=document.getElementById('btn')
    btn1.onclick=function(){
        alert("如果你的人生只有柠檬，记得配盐加点龙舌兰")
    }
</script>